package com.shengyuan.manage_os.old.ying.erpm.data;

import com.shengyuan.manage_os.old.ying.erpm.tasks.Submit_System_Setting_Data_Task;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;


public class SharePreferenceUtil {
	private SharedPreferences sp;
	private Editor editor;
//	private String T_ZIYOUJIXIE ,T_WAIZUJIXIE,T_ZIYOUSHILUN ;
//	private String T_GONYINGSHANG ,T_GONGCHENGMINGCHENG_GC,T_GONGCHENGMINGCHENG_JX, T_GONGCHENGMINGCHENG_OA;
//	private String T_CAILIAOMINGCHENG,T_ZHUANGDI = "T_ZHUANGDI",T_XIEDI = "T_XIEDI",T_FUWUXIANMU = "T_FUWUXIANMU";
	public static boolean isRun = false;
	public String getT_ZIYOUJIXIE() {
		return sp.getString(Submit_System_Setting_Data_Task.T_ZIYOUJIXIE, "");
	}

	public void setT_ZIYOUJIXIE(String t_ZIYOUJIXIE) {
		editor.putString(Submit_System_Setting_Data_Task.T_ZIYOUJIXIE, t_ZIYOUJIXIE);
		editor.commit();
	}

	public String getT_WAIZUJIXIE() {
		return sp.getString(Submit_System_Setting_Data_Task.T_WAIZUJIXIE, "");
	}

	public void setT_WAIZUJIXIE(String t_WAIZUJIXIE) {
		editor.putString(Submit_System_Setting_Data_Task.T_WAIZUJIXIE, t_WAIZUJIXIE);
		editor.commit();
	}

	public String getT_GONYINGSHANG() {
		return sp.getString(Submit_System_Setting_Data_Task.T_GONYINGSHANG, "");
	}

	public void setT_GONYINGSHANG(String t_GONYINGSHANG) {
		editor.putString(Submit_System_Setting_Data_Task.T_GONYINGSHANG, t_GONYINGSHANG);
		editor.commit();
	}

	public String getT_GONGCHENGMINGCHENG_GC() {
		return sp.getString(Submit_System_Setting_Data_Task.T_GONGCHENGMINGCHENG_GC, "");
	}

	public void setT_GONGCHENGMINGCHENG_GC(String t_GONGCHENGMINGCHENG_GC) {
		editor.putString(Submit_System_Setting_Data_Task.T_GONGCHENGMINGCHENG_GC, t_GONGCHENGMINGCHENG_GC);
		editor.commit();
	}

	public String getT_GONGCHENGMINGCHENG_JX() {
		return sp.getString(Submit_System_Setting_Data_Task.T_GONGCHENGMINGCHENG_JX, "");
	}

	public void setT_GONGCHENGMINGCHENG_JX(String t_GONGCHENGMINGCHENG_JX) {
		editor.putString(Submit_System_Setting_Data_Task.T_GONGCHENGMINGCHENG_JX, t_GONGCHENGMINGCHENG_JX);
		editor.commit();
	}

	public String getT_GONGCHENGMINGCHENG_OA() {
		return sp.getString(Submit_System_Setting_Data_Task.T_GONGCHENGMINGCHENG_OA, "");
	}

	public void setT_GONGCHENGMINGCHENG_OA(String t_GONGCHENGMINGCHENG_OA) {
		editor.putString(Submit_System_Setting_Data_Task.T_GONGCHENGMINGCHENG_OA, t_GONGCHENGMINGCHENG_OA);
		editor.commit();
	}

	public String getT_CAILIAOMINGCHENG() {
		return sp.getString(Submit_System_Setting_Data_Task.T_CAILIAOMINGCHENG, "");
	}

	public void setT_CAILIAOMINGCHENG(String t_CAILIAOMINGCHENG) {
		editor.putString(Submit_System_Setting_Data_Task.T_CAILIAOMINGCHENG, t_CAILIAOMINGCHENG);
		editor.commit();
	}

	public String getT_ZHUANGDI() {
		return sp.getString(Submit_System_Setting_Data_Task.T_ZHUANGDI, "");
	}

	public void setT_ZHUANGDI(String t_ZHUANGDI) {
		editor.putString(Submit_System_Setting_Data_Task.T_ZHUANGDI, t_ZHUANGDI);
		editor.commit();
	}

	public String getT_XIEDI() {
		return sp.getString(Submit_System_Setting_Data_Task.T_XIEDI, "");
	}

	public void setT_XIEDI(String t_XIEDI) {
		editor.putString(Submit_System_Setting_Data_Task.T_XIEDI, t_XIEDI);
		editor.commit();
	}

	public String getT_FUWUXIANMU() {
		return sp.getString(Submit_System_Setting_Data_Task.T_FUWUXIANMU, "");
	}

	public void setT_FUWUXIANMU(String t_FUWUXIANMU) {
		editor.putString(Submit_System_Setting_Data_Task.T_FUWUXIANMU, t_FUWUXIANMU);
		editor.commit();
	}

	public String getT_ZIYOUSHILUN() {
		return sp.getString(Submit_System_Setting_Data_Task.T_ZIYOUSHILUN, "");
	}
	
	public void setT_ZIYOUSHILUN(String chepaihaoma) {
		editor.putString(Submit_System_Setting_Data_Task.T_ZIYOUSHILUN, chepaihaoma);
		editor.commit();
	}
	
	public void WriteParam( String Key , String Value) {
		editor.putString(Key, Value);
		editor.commit();
	}
	
	public String ReadParam(String Key) {
		return sp.getString(Key, "");
	}	
	
	public SharePreferenceUtil(Context context) {
		sp = context.getSharedPreferences("Settings", context.MODE_PRIVATE);
		editor = sp.edit();
	}


}
